package com.tedu.day02.test;

/**
 * Object超类：万物皆对象，对象皆可new----所有类魔人继承与Object【方法】
 */
public class Object超类 extends Object {
    public static void main(String[] args) {
        //所有类都继承Object
        Object[] obj = new Object[4];
        //1.Object对象直接创建
        obj[0] = new Object();
        //2.String对象
        obj[1] = "字符串";
        //3.int类型
        obj[2] = 123;
        //4.当前对象
        obj[3] = new Object超类();
        //遍历：增强for循环
        for (Object b:obj) {
            System.out.println(b.toString());
            //四个对象：默认地址之打印
            System.out.println(b.getClass());
        }
    }
}
